function backup
A=imread('road.png');
imshow(A);
hold on
%第一段图形
x1=[205,275,282.5,227.5,238,223];
y1=[455,455,445,445,431,431];
patch(x1,y1,'red','FaceAlpha',0.5);
x2=[226.75,241.75,256.75,241.75];
y2=[425,425,405,405];
patch(x2,y2,'red','FaceAlpha',0.5);
x3=[245.5,260.5,271,305.5,313.5,263.5];
y3=[400,400,386,386,376,376];
patch(x3,y3,'red','FaceAlpha',0.5);
%第二段图形、
x4=[267.25,317.25,324.75,289.75,300.25,285.25];
y4=[371,371,361,361,347,347];
patch(x4,y4,'yellow','FaceAlpha',0.5);
x5=[289,304,315.25,300.25];
y5=[342,342,327,327];
patch(x5,y5,'yellow','FaceAlpha',0.5);
x6=[304,319,327.25,351,356.25,318.25];
y6=[322,322,311.5,311.5,303,303];
patch(x6,y6,'yellow','FaceAlpha',0.5);
%第三段图形
x7=[322.75,360.75,366.75,340.75,349.75,337.75];
y7=[297,297,289,289,277,277];
patch(x7,y7,'green','FaceAlpha',0.5);
x8=[340.75,352.75,360.25,348.25];
y8=[273,273,263,263];
patch(x8,y8,'green','FaceAlpha',0.5);
x9=[351.25,363.25,372.5,392.25,398.25,366.259];
y9=[258,258,246,246,238,238];
patch(x9,y9,'green','FaceAlpha',0.5);
%第四段图形
x12=[568,638,620,605,615.5,560.5];
y12=[454,454,430,430,444,444];
patch(x12,y12,'red','FaceAlpha',0.5);
x22=[601.25,616.25,601.25,586.25];
y22=[425,425,405,405];
patch(x22,y22,'red','FaceAlpha',0.5);
x32=[582.5,597.5,579.5,529.5,537,572];
y32=[400,400,376,376,386,386];
patch(x32,y32,'red','FaceAlpha',0.5);
%第五段图形
x42=[525.75,575.75,557.75,542.75,553.75,518.25];
y42=[371,371,347,347,361,361];
patch(x42,y42,'yellow','FaceAlpha',0.5);
x52=[539,554,542.75,527.75];
y52=[342,342,327,327];
patch(x52,y52,'yellow','FaceAlpha',0.5);
x63=[524,539,524.75,486.75,492.75,515.75];
y63=[322,322,303,303,311,311];
patch(x63,y63,'yellow','FaceAlpha',0.5);
%第六段图形
x72=[482.25,520.25,505.25,493.25,502.25,476.25];
y72=[297,297,277,277,289,289];
patch(x72,y72,'green','FaceAlpha',0.5);
x82=[490.25,502.25,494.25,482.75];
y82=[273,273,263,263];
patch(x82,y82,'green','FaceAlpha',0.5);
x92=[479.75,491.75,476.75,444.75,450.75,470.75];
y92=[259,259,239,239,247,247];
patch(x92,y92,'green','FaceAlpha',0.5);